﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Flag : MonoBehaviour
{
    public List<GameObject> charactors;
    private void OnTriggerEnter2D(Collider2D collision)
    {
        foreach (GameObject item in charactors)
        {
            if (collision.gameObject.name == item.name)
            {
                LevelOver.Win();
                return;
            }
        }
    }
}
